package devbureau.fstore.common;

import java.util.Date;


public class ItemImpl implements Item {


	protected Date deliveryDate = null;
	protected Integer quantity = null;
	protected Double price = null;
	protected String supplierLabel = null;
	protected String name = null;
	protected Integer length = null;
    protected String plantation = null;

	public ItemImpl(String supplierLabel, String name, Integer length, Date deliveryDate, Integer quantity, Double price, String plantation) {
		this.supplierLabel = supplierLabel;
		this.name = name;
		this.length = length;
        this.plantation = plantation;
		this.deliveryDate = deliveryDate;
		this.quantity = quantity;
		this.price = price;
	}
    
	@Override
	public Date getDeliveryDate() {
		return deliveryDate;
	}

	@Override
	public Integer getQuantity() {
		return quantity;
	}

    @Override
    public String toString() {
        StringBuffer buffer = new StringBuffer();
        buffer.append("supplier:"+supplierLabel);
        buffer.append(";name:"+name);
        buffer.append(";deliveryDate:"+deliveryDate);
        buffer.append(";quantity:"+quantity);
        buffer.append(";price:"+price);

        return buffer.toString();
    }

    public Double getPrice() {
        return price;
    }

    public String getPlantation(){
        return plantation;
    }

	@Override
	public String getSupplierLabel() {
		return supplierLabel;
	}

	@Override
	public Integer getLength() {
		return length;
	}

	@Override
	public String getName() {
		return name;
	}

}
